import React from 'react'
// 组件从antd中引入
import { Button, Modal } from 'antd'
// 字体图标组件从@ant-design/icons引入
import {
  DownloadOutlined,
  ArrowUpOutlined,
  ExclamationCircleOutlined,
} from '@ant-design/icons'
export default function App() {
  const showConfirm = () => {
    Modal.confirm({
      title: '你确定吗?',
      icon: <ExclamationCircleOutlined />,
      content: '你确定要删除这条信息吗',
      onOk() {
        console.log('i do')
      },
      onCancel() {
        console.log('i do not')
      },
      okText: '确认',
      cancelText: '取消',
    })
  }
  return (
    <div>
      <Button
        // primary | ghost | dashed | link | text | default
        type="primary" // 按钮样式类型
        shape="round" //形状
        icon={<ArrowUpOutlined />} // 安装上显示的字体图标
        size={'large'} //按钮大小
        onClick={showConfirm}
      >
        按钮
      </Button>
    </div>
  )
}
